<!DOCTYPE html>
<html>
<head>
<title>合同管理</title>
<#include "/header.html">
</head>
<body>
<div id="rrapp" v-cloak>
	<div v-show="showList">
		<div class="grid-btn">
<!--			<div class="form-group col-sm-2">-->
			<div class="form-group col-sm-2">
				<input class="form-control" id="name" v-model="q.name" @keyup.enter="query"
					   placeholder="合同名称">
			</div>
			<a class="btn btn-default" @click="query">查询</a>
			<#if shiro.hasPermission("person:contract:save")>
			<a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
			</#if>
			<#if shiro.hasPermission("person:contract:update")>
			<a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
			</#if>
			<#if shiro.hasPermission("person:contract:delete")>
			<a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
			</#if>
		</div>
	    <table id="jqGrid"></table>
	    <div id="jqGridPager"></div>
    </div>

	<div v-show="!showList" class="panel panel-default">
		<div class="panel-heading">{{title}}</div>
		<form class="form-horizontal">
			<div class="form-group">
				<div class="col-sm-2 control-label">合同名称</div>
				<div class="col-sm-10">
					<input v-model="contract.name"  placeholder="合同名称" name="name"
						   id="name" class="layui-input" autocomplete="off">
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">合同金额</div>
				<div class="col-sm-10">
					<input type="number" v-model="contract.amount"  placeholder="合同金额" name="contractNum"
						   id="amount" class="layui-input" autocomplete="off">
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">合同甲方</div>
				<div class="col-sm-10">
					<input v-model="contract.partA"  placeholder="合同甲方" name="partA"
						   id="partA" class="layui-input" autocomplete="off">
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">合同乙方</div>
				<div class="col-sm-10">
					<input v-model="contract.partB"  placeholder="合同乙方" name="partB"
						   id="partB" class="layui-input" autocomplete="off">
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">签订日期</div>
				<div class="col-sm-10">
					<input type="date" v-model="contract.signDate"  placeholder="签订日期" name="signDate"
						   id="signDate" class="layui-input" autocomplete="off">
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label"></div>
				<input type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定"/>
				&nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
			</div>
		</form>
	</div>
</div>

<!-- 选择部门 -->
<div id="deptLayer" style="display: none;padding:10px;">
	<ul id="deptTree" class="ztree"></ul>
</div>
<script src="${request.contextPath}/statics/js/modules/person/contract.js?_${.now?long}"></script>
</body>
</html>